import { createClient } from 'oicq'
import ProcessEnv from '../config/config.default'
const client = createClient(ProcessEnv.QQ_ACCOUNT)

client.on('system.online', () => console.log('Logged in!'))

client
    .on('system.login.qrcode', function () {
        //扫码后按回车登录
        process.stdin.once('data', () => {
            this.login()
        })
    })
    .login()

export default client
